<!--
Copyright 2018 Google LLC. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================
-->

<html>
  <head>
    <title>MNIST in TensorFlow.js Layers API</title>
    <link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.cyan-teal.min.css" />
  </head>
  <body>
    <style>
      #content {
        padding: 15px;
      }
      body, input, select, button {
        font-family: monospace;
      }
      canvas {
        width: 200px;
      }
      .prediction-canvas{
        width: 100px;
      }
      .pred {
        font-size: 20px;
        line-height: 25px;
        width: 100px;
      }
      .pred-correct {
        background-color: #00cf00;
      }
      .pred-incorrect {
        background-color: red;
      }
      .pred-container {
        display: inline-block;
        width: 100px;
        margin: 10px;
      }
      #lossCanvas > div, #accuracyCanvas > div {
        display: none;
      }
      .canvases {
        display: inline-block;
      }
      .hparam-label {
        display: inline-block;
        width: 250px;
      }
    </style>

    <div id="content">
      <h3>TensorFlow.js: Train MNIST with the Layers API</h3>

      <div>
        <div>
          <span class="hparam-label">Model Type:</span>
          <select id="model-type">
            <option>ConvNet</option>
            <option>DenseNet</option>
          </select>
        </div>

        <div>
          <span class="hparam-label"># of training epochs:</span>
          <input id="train-epochs" value="3">
        </div>

        <button id="train">Load Data and Train Model</button>
      </div>

      <div id="status"></div>
      <div id="message"></div>

      <div id="stats">
        <div class="canvases">
          <div class="label" id="loss-label"></div>
          <div id="loss-canvas"></div>
        </div>
        <div class="canvases">
          <div class="label" id="accuracy-label"></div>
          <div id="accuracy-canvas"></div>
        </div>
      </div>

      <div id="images"></div>
    </div>

    <!-- TODO(cais): Decide. DO NOT SUBMIT. -->
    <!-- <script src="https://cdn.plot.ly/plotly-latest.min.js"></script> -->
    <script src="index.js"></script>
  </body>
</html>
